package com.cxh.rmsq.net.newNet

import android.text.TextUtils
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.cxh.rmsq.db.model.BaseResultInviteListBean
import com.cxh.rmsq.db.model.BaseResultJoinActivityListBean
import com.cxh.rmsq.db.model.BaseResultJoinRecordListBean
import com.cxh.rmsq.db.model.BaseResultListBean
import com.cxh.rmsq.db.model.BaseResultOrderListBean
import com.cxh.rmsq.db.model.BaseResultPayListBean
import com.cxh.rmsq.db.model.BaseResultRankListBean
import com.cxh.rmsq.db.model.ClueBean
import com.cxh.rmsq.db.model.HuntBean
import com.cxh.rmsq.db.model.InviteExchangeBean
import com.cxh.rmsq.db.model.MapMarkersBean
import com.cxh.rmsq.db.model.MapProgressBean
import com.cxh.rmsq.db.model.OrderListBean
import com.cxh.rmsq.db.model.PayOrderBean
import com.cxh.rmsq.db.model.ProductInfoBean
import com.cxh.rmsq.db.model.ProgressBean
import com.cxh.rmsq.model.LoginResult
import com.cxh.rmsq.utils.toRequestBody
import kotlinx.coroutines.launch

class VipViewModel : ViewModel() {

    /**
     * 获得vip商品
     */
    fun getProductInfo(vipLevel: Int, func: (BaseResultEntity<ProductInfoBean>) -> Unit) {
        viewModelScope.launch {
            func(
                ApiServiceClient.apiService.getProductInfo(vipLevel)
            )
        }
    }

 /**
     * 获得vip商品
     */
    fun getMyPayList(pageNo: Int,pageSize: Int, func: (BaseResultEntity<BaseResultPayListBean>) -> Unit) {
        viewModelScope.launch {
            func(
                ApiServiceClient.apiService.getMyPayList(pageNo,pageSize)
            )
        }
    }

}